home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / dpmigcc5.zip / RSX / SOURCE / RMLIB.H < prev    next >
C/C++ Source or Header  |  1994-12-12  |  3KB  |  131 lines

  1. /*
  2. **  (c) Rainer Schnitker 1994
  3. */
  4.  
  5. #ifndef _RMLIB_H
  6. #define _RMLIB_H
  7.  
  8. /* Real Mode DOS Calls */
  9.  
  10. #if !defined (NULL)
  11. #define NULL ((void *) 0)
  12. #endif
  13.  
  14. #if !defined (SEEK_SET)
  15. #define SEEK_SET 0
  16. #define SEEK_CUR 1
  17. #define SEEK_END 2
  18. #endif
  19.  
  20. #if !defined (RM_O_RDONLY)
  21. #define RM_O_RDONLY        0x0000
  22. #define RM_O_WRONLY        0x0001
  23. #define RM_O_RDWR        0x0002
  24.  
  25. #define RM_O_DENYRW        0x0010
  26. #define RM_O_DENYWR        0x0020
  27. #define RM_O_DENYRD        0x0020
  28. #define RM_O_DENYNO        0x0030
  29.  
  30. #define RM_O_NOINHERIT        0x0080
  31. #endif
  32.  
  33. #if !defined (_A_NORMAL)
  34. #define _A_NORMAL    0x00
  35. #define _A_RDONLY    0x01
  36. #define _A_HIDDEN    0x02
  37. #define _A_SYSTEM    0x04
  38. #define _A_VOLID    0x08
  39. #define _A_SUBDIR    0x10
  40. #define _A_ARCH     0x20
  41. #endif
  42.  
  43. #ifndef _FIND_T_DEFINED
  44. #define _FIND_T_DEFINED
  45. struct find_t {
  46.     char        reserved[21];
  47.     unsigned char    attrib;
  48.     unsigned short    wr_time;
  49.     unsigned short    wr_date;
  50.     unsigned short    size_lo;
  51.     unsigned short    size_hi;
  52.     char        name[13];
  53.     };
  54. #endif
  55.  
  56. #ifndef _DATETIME_T_DEFINED
  57. #define _DATETIME_T_DEFINED
  58. struct dos_date {
  59.     unsigned short ddate_year;        /* 1980 - 2099 */
  60.     unsigned char  ddate_month;     /* 1 - 12 */
  61.     unsigned char  ddate_day;        /* 1 - 31 */
  62.     unsigned char  ddate_dayofweek; /* 0 = sonday */
  63. };
  64.  
  65. struct dos_time {
  66.     unsigned char dtime_hour;       /* 0 - 23 */
  67.     unsigned char dtime_minutes;   /* 0 - 59 */
  68.     unsigned char dtime_seconds;   /* 0 - 59 */
  69.     unsigned char dtime_hsec;       /* 0 - 99 */
  70. };
  71.  
  72. struct file_time {
  73.     unsigned short ft_date;
  74.     unsigned short ft_time;
  75. };
  76. #endif
  77.  
  78. struct execb {
  79.     unsigned short psp_2c;
  80.     unsigned short psp_80_off;
  81.     unsigned short psp_80_seg;
  82.     unsigned short fcb1_off;
  83.     unsigned short fcb1_seg;
  84.     unsigned short fcb2_off;
  85.     unsigned short fcb2_seg;
  86. };
  87.  
  88. unsigned rm_bios_read_keybrd(unsigned mode);
  89.  
  90. int    rm_setdrive(WORD drive);
  91. int    rm_getdrive(void);
  92. void    rm_setdta(void *buf);
  93.  
  94. void    rm_getdate(struct dos_date *dd);
  95. int    rm_setdate(struct dos_date *dd);
  96. void    rm_gettime(struct dos_time *dt);
  97. int    rm_settime(struct dos_time *dt);
  98.  
  99. int    rm_chdir(char *name);
  100. int    rm_getfattr(char *name, WORD *attr);
  101. int    rm_setfattr(char *name, WORD attr);
  102. int    rm_access(char *name, WORD mode);
  103. int    rm_getcwd(WORD drive, char *name);
  104. int    rm_findfirst(char *name, WORD attr, struct find_t *ft);
  105.  
  106. int    rm_creat(char *name, WORD attr);
  107. int    rm_open(char *name, WORD modes);
  108. int    rm_close(WORD handle);
  109. int    rm_read(WORD handle, void *buf, WORD bytes);
  110. int    rm_write(WORD handle, void * buf, WORD bytes);
  111. long    rm_lseek(WORD handle, DWORD offset, WORD orgin);
  112. int    rm_dup(WORD handle);
  113. int    rm_dup2(WORD handle, WORD newhandle);
  114. int    rm_creatnew(char *name, WORD attr);
  115. int    rm_getftime(WORD handle, WORD *date, WORD *time);
  116. int    rm_setftime(WORD handle, WORD date, WORD time);
  117. int    rm_sethandles(WORD handles);
  118.  
  119. int    rm_ioctl_getattr(WORD handle);
  120. int    rm_isatty(WORD handle);
  121. int    rm_ioctl_setattr(WORD handle, WORD mode);
  122. int    rm_ioctl_select_in(WORD handle);
  123. int    rm_ioctl_remotedrive(BYTE drive);
  124.  
  125. int    rm_exec(char *, struct execb *);
  126. int    rm_get_exit_status(void);
  127.  
  128. extern unsigned emx_errno;
  129.  
  130. #endif /* _RMLIB_H */
  131.